package com.share.design.status.demo01;

/**
 * 3 -  运输中
 * @author caifan
 * @since 2022/11/6
 */
public class InTransition implements PackageState {
    // 单例
    private static InTransition instance = new InTransition();

    private InTransition() {}

    public static InTransition getInstance() {
        return instance;
    }


    @Override
    public void updateState(PackageContext ctx) {
        System.out.println("3-运输中");
        ctx.setCurrentState(Delivering.getInstance());
    }
}
